<template lang="">
  <div style="margin-bottom: 35px">
    <a-typography-title :level="5">{{ $t('touZ-6') }}</a-typography-title>
    <a-table :columns="columns" :data-source="totalRawInfo" bordered :pagination="false">
      <template #bodyCell="{ column, text }">
        <template v-if="column.dataIndex === 'name'">
          <a href="javascript:;">{{ text }}</a>
        </template>
      </template>
    </a-table>
  </div>
</template>
<script setup lang="ts">
import { ref, defineProps, type PropType, computed } from 'vue';
import { useI18n } from 'vue-i18n'
const { t } = useI18n()

const props = defineProps({
  totalInfo: {
    type: Object as PropType<{
      payout: number;
      total_bet: number;
      total_bet_count: number;
      total_deposit: number;
      total_valid_bet: number;
      total_win_and_loss: number;
      total_withdraw : number;
    }>,
    required: true,
    default: () => undefined
  }
});
const totalRawInfo = computed(() => props.totalInfo ? [props.totalInfo] : []);
console.log(totalRawInfo);
const columns = [
  {
    title: t('zong-4'),
    dataIndex: 'total_deposit',
    key: 'total_deposit',
  },
  {
    title: t('zong-5'),
    dataIndex: 'total_withdraw',
    key: 'total_withdraw',
  },
  {
    title: '总笔数',
    dataIndex: 'total_bet_count',
    key: 'total_bet_count',
  },
  {
    title: t('zong-6'),
    dataIndex: 'total_bet',
    key: 'total_bet',
  },
  {
    title: t('zong-7'),
    dataIndex: 'total_valid_bet',
    key: 'total_valid_bet',
  },
  {
    title: t('weiP'),
    dataIndex: 'payout',
    key: 'payout',
  },
  {
    title: t('zong-8'),
    dataIndex: 'total_win_and_loss',
    key: 'total_win_and_loss',
  },
];
</script>
<style lang="">
  
</style>